<template>
  <div class="hello">

  </div>
</template>

<script>
import LocalStorage from '../utils/local-storage';
import TokenCheck from '../utils/token-check';

export default {
  name: 'HelloWorld',
  data () {
    return {

    }
  },

  mounted() {
    // const {token} = this.$route.query;
    try {
      const s = window.location.search;
      if (s.includes('token=')) {
        const i = s.indexOf('=');
        const token = s.substring(i+1);
        // console.log(token);
        token && LocalStorage.setToken('Bearer ' + token);
        TokenCheck.clearTokenQuery();
      }
    } catch (e) {

    } finally {
      this.$router.push({
        path: '/home'
      });
    }

  },
}
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped>

</style>
